﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>H3 BPM</title>
    <link rel="stylesheet" href="welcome.css" />
    <script src="../../WFRes/_Scripts/jquery/jquery.js?v=1.12.4"></script>
    <script src="../../WFRes/_Scripts/jquery/jquery.lang.js" type="text/javascript"></script>
    <script src="../../WFRes/_Scripts/vue/vue.min.js" type="text/javascript"></script>
    <script src="Welcome.js"></script>
    <script type="text/javascript">
        var pageInfo = {
            controls: {
                divBody: ".body",
                divBizRule: "#divBizRule",
                divAdapter: "#divAdapter"
            }
        }

        $(function () {
            $.each(pageInfo.controls, function (k, v) {
                pageInfo.controls[k] = $(v);
            });
            // $(".activityFoot").hide();
            // 注册退格事件，回到主页
            $("body").keydown(function (e) {
                if (e.keyCode == 8) {
                    window.location.href = "Home.html";
                    e.preventDefault();
                }
            });
            var a, b, c;

            // 线条连接业务服务到适配器
            a = getSidePoint(pageInfo.controls.divAdapter, "right");
            c = getSidePoint(pageInfo.controls.divBizRule, "left");
            $("<div></div>")
               .addClass("poly-line")
               .addClass("pointLine-right")
               .css("width", c.x - a.x)
               .css("height", 1)
               .css("left", a.x)
               .css("top", a.y)
               .appendTo(pageInfo.controls.divBody);
        });

        var getSidePoint = function (obj, side) {
            if (side == "top") {
                return {
                    x: obj.position().left + obj.width() / 2,
                    y: obj.position().top
                };
            }
            else if (side == "left") {
                return {
                    x: obj.position().left,
                    y: obj.position().top + obj.height() / 2
                };
            }
            else if (side == "right") {
                return {
                    x: obj.position().left + obj.width(),
                    y: obj.position().top + obj.height() / 2
                };
            }
            else {
                return {
                    x: obj.position().left + obj.width() / 2,
                    y: obj.position().top + obj.height()
                };
            }
        }
    </script>
    <style type="text/css">
        @media screen and (max-width:1280px) {
            .body {
                width: 90%;
                left: 56px;
            }
        }

        @media screen and (max-width:1024px) {
            .body {
                width: 100%;
                left: -26px;
            }
        }
    </style>
</head>
<body id="content">
    <div class="head">
        <div>
            <div class="title">
                {{Welcome.Wel_BizRule}}
            </div>
            <hr class="line" />
            <div class="description">
                &nbsp;&nbsp;&nbsp;&nbsp;<!--H3 BPM业务规则可以通过系统默认提供的或者自行开发的解析器，定义各种业务规则，与流程数据绑定实现规则与流程的联动。-->
                {{Welcome.Wel_BizRule_Des}}
            </div>
        </div>
    </div>
    <div class="body">
        <div id="divAdapter" class="activity activityPointer" style="top: 150px; left: 150px; width: 220px;" onclick="openUrl(' {{Welcome.Wel_BizRuleParser}}','../admin/BizRule/ListRuleAdapter.html');">
            <div class="activityHead">
                <div>
                    {{Welcome.Wel_BizRuleParser}}
                </div>
            </div>
            <div class="activityBody">
                <div>
                    {{Welcome.Wel_BizRuleParserDes}}
                </div>
            </div>
            <div class="activityFoot">
                <div>
                    <a href="#" onclick="openUrl(' {{Welcome.Wel_BizRuleParser}}','../admin/BizRule/ListRuleAdapter.html')">点击进入>></a>
                </div>
            </div>
        </div>
        <div id="divBizRule" class="activity" style="top: 150px; left: 520px; width: 220px">
            <div class="activityHead">
                <div>
                    {{Welcome.Wel_BizRuleInstance}}
                </div>
            </div>
            <div class="activityBody">
                <div>
                    {{Welcome.Wel_BizRuleInstanceDes}}
                </div>
            </div>
            <div class="activityFoot">
                <div style="display: none">
                    点击进入>>
                </div>
            </div>
        </div>

        <!--        <div class="poly-line down-right" style="width: 200px; height: 200px; top: 20px; left: 400px"></div>
        <div class="poly-line top-right" style="width: 200px; height: 200px; top: 20px; left: 700px"></div>-->
    </div>
</body>
</html>
